<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AlterAddColumnDingzhibiaoStatus extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('shop_product_status', function (Blueprint $table) {
            $table->unsignedInteger('price')->default(0)->after('status')->comment('自定义价格');
            $table->unsignedInteger('showPlatform')->default(1)->after('status')
                  ->comment('渠道显示 1:POS 2:小程序 保存多个时需把对应数字相加');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('shop_product_status', function (Blueprint $table) {
            $table->dropColumn('price');
            $table->dropColumn('showPlatform');
        });
    }
}
